package com.auto.api.framework.entity;

import com.auto.api.common.constant.ComConstant;
import lombok.Data;

/**
 * @program:
 * @description: 入参
 * @author: liangshf
 * @create: 2019-07-24 10:46
 */
@Data
public class BaseParamBO<T> {
    /**
     * 具体处理参数
     */
    private T param;

    /**
     * 策略类型常量
     */
    private String strategyType;

    /**
     * 命令类型常量
     */
    private String commandType;

    /**
     * 过滤器链组装类型
     */
    private String filterChainType;

    public BaseParamBO() {
    }

    public BaseParamBO(T param, String strategyType, Boolean ifChain) {
        this.param = param;
        this.strategyType = strategyType;
        this.filterChainType = strategyType + (ifChain ? ComConstant.BASE_CHAIN : "");
    }

    public BaseParamBO(T param, String strategyType, String filterChainType) {
        this.param = param;
        this.strategyType = strategyType;
        this.filterChainType = filterChainType;
    }
}